﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Hospital_Management_System.Control
{
    public partial class MyMenu : UserControl
    {
        private int buttonTabCount;

        public int ButtonTabCount
        {
            get { return buttonTabCount; }
            set { buttonTabCount = value; }
        }

        public MyMenu()
        {
            InitializeComponent();
            buttonTabCount = 0;
        }


        private void btnAdd_Click(object sender, EventArgs e)
        {
            ButtonTab btntab = new ButtonTab();
            btntab.Location = new Point(0, btntab.Height *ButtonTabCount);
            btntab.Width = this.Width;
            btntab._BorderStyle = BorderStyle.FixedSingle;

            if (buttonTabCount < this.Height / (btntab.Height + 2))
            {
                btntab.Height = 25;
            }
            else
            {
                btntab.Height = this.Height / (buttonTabCount + 1);
            }
            this.Controls.Add(btntab);
            buttonTabCount++;
        }

        private void MyMenu_Load(object sender, EventArgs e)
        {

        }

        private void btnRemove_Click(object sender, EventArgs e)
        {
           
        }
    }
}
